<?php

namespace app\admin\controller\law_case;

use app\admin\service\LawCaseCategoryService;
use ShidianUtil\Thinkphp\Response\ApiResponse;
use think\APP;
use think\Request as Request;

/**
 * LawCaseCategory 控制器
 * Class LawCaseCategory
 * @package app\admin\controller\law_case;
 * @link https://www.kancloud.cn/manual/thinkphp6_0/1037509
 * @see \app\admin\validate\law_case\LawCaseCategory
 */
class LawCaseCategory
{
    // 请求参数
    private Request $request;

    // service
    private LawCaseCategoryService $service;

    public function __construct(Request $request, LawCaseCategoryService $lawCaseCategoryService)
    {
        $this->request = $request;
        $this->service = $lawCaseCategoryService;
    }

    /**
     * 列表
     * @return ApiResponse
     * @url /law_case/law_case_category/index
     */
    public function index(): ApiResponse
    {
        return ApiResponse::success($this->service->indexOptions());
    }

}
